<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-1.10.2.min.js"></script>
    <script>
        $(function () {
            $("#btn_json").click(
                function () {
                    $.get("respJson",{name:'小明',age:'20'},function (data) {
                        console.log(data.name)
                        console.log(data.age)
                        console.log(data.gender)
                        console.log(data.birthday)
                    })
                }
            )
        })
    </script>
</head>
<body>
hello2 jsp

<form action="requestParam1">
    <input type="text" name="username">
    <input type="submit" value="提交">
</form>

<form action="requestParam2">
    username:<input type="text" name="username">
    pwd:<input type="text" name="pwd">
    <input type="submit" value="提交">
</form>

<form action="requestParam3" method="post">
    <p>name:<input type="text" name="name"></p>
    <p>gender:<input type="radio" name="gender" value="0">男  <input type="radio" name="gender" value="1">女</p>
    <p>age:<input type="text" name="age"></p>
    <p>birthday:<input type="text" name="birthday"></p>
    <p><input type="submit" value="提交"></p>
</form>

<button id="btn_json">ajax获取json</button>

</body>
</html>
